const skyDom = document.querySelector(".sky");
const skyStyleData = getComputedStyle(skyDom);
const skyWidth = parseFloat(skyStyleData.width);
const skyHeight = parseFloat(skyStyleData.height);
class Sky extends Rectangle {
  constructor(speed) {
    // 调用父类
    super(skyWidth, skyHeight, 0, 0, speed, 0, skyDom);
  }
  onMove() {
    // console.log("Sky类的onMove事件");
    if (this.left <= -skyWidth / 2) {
      this.left = 0;
    }
  }
}
